
import { createRouter, createWebHistory } from 'vue-router' // 引入路由

// 创建路由实例
const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: '/login',
            name: 'login',
            component: () => import('../views/login/Login.vue') // 示例路径，请根据实际路径填写
        },{
            path: '/',
            name: 'home',
            component: () => import('../layout/AppLayout.vue'), // 示例路径，请根据实际路径填写
            children: [
                {
                    path: '/',
                    component: () => import('../views/indexView.vue') // 示例路径，请根据实际路径填写
                },
                {
                    path: '/about',
                    component: () => import('../views/AboutView.vue') // 示例路径，请根据实际路径填写
                }
            ]
        },{
        path: '/:pathMatch(.*)',
        name: '404',
        component: () => import('../views/404.vue'), // 示例路径，请根据实际路径填写
        }
    ]
})

export default router // 导出路由实例